package org.adl.registry.website;

import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author marksj
 */
public class RetrieveValidationStatusRequest extends StatusRequestHandler
{
    
    /**
     * Creates a new instance of RetrieveValidationStatusRequest
     */
    public RetrieveValidationStatusRequest(HttpServletRequest iRequest, ServletContext iContext)
    throws InvalidRequestException
    {
        super();
        
        super.setRequestType(StatusRequestHandler.StatusCheckTypes.Validation);
        
        super.setServletRequest(iRequest);
        super.setServletContext(iContext);
        
        String registry = iRequest.getParameter("registry"); // This parameter value should be the parameter containing the target registry.
        super.setRegistry(registry);
        
        String userId = iRequest.getParameter("userid"); // This parameter value should be the parameter containing the users username.
        super.setUserId(userId);
        
        String password = iRequest.getParameter("password"); // This parameter value should be the parameter containing the users password.
        super.setPassword(password);
        
        String validationId = iRequest.getParameter("validationID"); // This parameter value should be the parameter containing target validation id.
        super.setTargetIdentifier(validationId);
        
        String rimUrl = PortalUtil.getRimUrl(iContext, registry);
        super.setRimUrl(rimUrl);
        
        String cak = PortalUtil.getClientAccessKey(iContext);
        super.setClientAccessKey(cak);
    }
    
    public String InvokeRequest()
    throws IOException, InvalidRequestException
    {
        String rimResponse = "";
        
        rimResponse = "";
        
        return rimResponse;
    }
}
